/*
 * An XML document type.
 * Localname: Resource
 * Namespace: http://www.hpsearch.org/schemas/2006/05/BSA
 * Java type: cgl.narada.mgmt.schemas.bsa.ResourceDocument
 *
 * Automatically generated - do not modify.
 */
package cgl.narada.mgmt.schemas.bsa.impl;
/**
 * A document containing one Resource(@http://www.hpsearch.org/schemas/2006/05/BSA) element.
 *
 * This is a complex type.
 */
public class ResourceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements cgl.narada.mgmt.schemas.bsa.ResourceDocument
{
    
    public ResourceDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName RESOURCE$0 = 
        new javax.xml.namespace.QName("http://www.hpsearch.org/schemas/2006/05/BSA", "Resource");
    
    
    /**
     * Gets the "Resource" element
     */
    public cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource.Enum getResource()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RESOURCE$0, 0);
            if (target == null)
            {
                return null;
            }
            return (cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "Resource" element
     */
    public cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource xgetResource()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource target = null;
            target = (cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource)get_store().find_element_user(RESOURCE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "Resource" element
     */
    public void setResource(cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource.Enum resource)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RESOURCE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RESOURCE$0);
            }
            target.setEnumValue(resource);
        }
    }
    
    /**
     * Sets (as xml) the "Resource" element
     */
    public void xsetResource(cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource resource)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource target = null;
            target = (cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource)get_store().find_element_user(RESOURCE$0, 0);
            if (target == null)
            {
                target = (cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource)get_store().add_element_user(RESOURCE$0);
            }
            target.set(resource);
        }
    }
    /**
     * An XML Resource(@http://www.hpsearch.org/schemas/2006/05/BSA).
     *
     * This is an atomic type that is a restriction of cgl.narada.mgmt.schemas.bsa.ResourceDocument$Resource.
     */
    public static class ResourceImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements cgl.narada.mgmt.schemas.bsa.ResourceDocument.Resource
    {
        
        public ResourceImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType, false);
        }
        
        protected ResourceImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
        {
            super(sType, b);
        }
    }
}
